CUR_PATH       := $(shell pwd)
CMDSERVER_PATH := $(CUR_PATH)
CMDSERVER_OUT  := libcmd_server.a

CMDSERVER_OBJ  := ${CMDSERVER_PATH}/cmd_server_main.o
CMDSERVER_OBJ  += ${CMDSERVER_PATH}/vctrl_thread.o
CMDSERVER_OBJ  += ${CMDSERVER_PATH}/net_thread.o
CMDSERVER_OBJ  += ${CMDSERVER_PATH}/vcap_thread.o


CMDSERVER_SRC  := ${CMDSERVER_PATH}/cmd_server_main.c
CMDSERVER_SRC  += ${CMDSERVER_PATH}/vctrl_thread.c
CMDSERVER_SRC  += ${CMDSERVER_PATH}/net_thread.c
CMDSERVER_SRC  += ${CMDSERVER_PATH}/vcap_thread.c

CMDSERVER_CFLAGS := -Wall -D_LINUX_ -I$(COMLIBS_INCLUDE_PATH) -I$(COMDRVS_INCLUDE_PATH) -lpthread -l${COMLIBS_LIB_NAME} -L${COMLIBS_LIB_PATH}


all:
	$(DRVLIB_CC) $(CMDSERVER_CFLAGS) -O2 $(CMDSERVER_SRC) -c

	$(DRVLIB_AR) crus $(CMDSERVER_OUT) $(CMDSERVER_OBJ)

clean:
	rm -f *.a *.o
